package com.dys.ai.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单实体类
 */
public class Order {
    /**
     * 订单ID
     */
    private Long id;

    /**
     * 用户编号
     */
    private Long userId;

    /**
     * 座位编号
     */
    private Long seatId;

    /**
     * 座位类型(0:商务座,1:一等座,2:二等座)
     */
    private Integer seatType;

    /**
     * 车次编号
     */
    private Long trainId;

    /**
     * 改签前的订单编号
     */
    private Long originalOrderId;

    /**
     * 下单时间
     */
    private LocalDateTime orderTime;

    /**
     * 订单状态(0：未付款，1：已付款，2：已退款，3：已改签)
     */
    private Integer status;

    /**
     * 是否已改签(0:否,1:是)
     */
    private Integer isChanged;

    /**
     * 退款费用
     */
    private BigDecimal refundFee;

    /**
     * 退款时间
     */
    private LocalDateTime refundTime;

    public Order() {
    }

    public Order(Long id, Long userId, Long seatId, Integer seatType, Long trainId, Long originalOrderId, LocalDateTime orderTime, Integer status, Integer isChanged, BigDecimal refundFee, LocalDateTime refundTime) {
        this.id = id;
        this.userId = userId;
        this.seatId = seatId;
        this.seatType = seatType;
        this.trainId = trainId;
        this.originalOrderId = originalOrderId;
        this.orderTime = orderTime;
        this.status = status;
        this.isChanged = isChanged;
        this.refundFee = refundFee;
        this.refundTime = refundTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSeatId() {
        return seatId;
    }

    public void setSeatId(Long seatId) {
        this.seatId = seatId;
    }

    public Integer getSeatType() {
        return seatType;
    }

    public void setSeatType(Integer seatType) {
        this.seatType = seatType;
    }

    public Long getTrainId() {
        return trainId;
    }

    public void setTrainId(Long trainId) {
        this.trainId = trainId;
    }

    public Long getOriginalOrderId() {
        return originalOrderId;
    }

    public void setOriginalOrderId(Long originalOrderId) {
        this.originalOrderId = originalOrderId;
    }

    public LocalDateTime getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(LocalDateTime orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsChanged() {
        return isChanged;
    }

    public void setIsChanged(Integer isChanged) {
        this.isChanged = isChanged;
    }

    public BigDecimal getRefundFee() {
        return refundFee;
    }

    public void setRefundFee(BigDecimal refundFee) {
        this.refundFee = refundFee;
    }

    public LocalDateTime getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(LocalDateTime refundTime) {
        this.refundTime = refundTime;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", seatId=" + seatId +
                ", seatType=" + seatType +
                ", trainId=" + trainId +
                ", originalOrderId=" + originalOrderId +
                ", orderTime=" + orderTime +
                ", status=" + status +
                ", isChanged=" + isChanged +
                ", refundFee=" + refundFee +
                ", refundTime=" + refundTime +
                '}';
    }
}
